function getSysMsg(result) {
    switch (result.code) {
        /*全局*/
        case 0:
            return "操作成功";
        case -1:
            return "操作失败";
        case -2:
            return "登录超时，请重新登录！";
        case -3:
            return "系统异常，请稍后重试！";
        case -4:
            return "缺少字段，请检查！";
        case -5:
            return "服务器上找不到当前请求的页面";

        /*后台用户*/
        case 10001:
            return "账号或密码错误，请检查！";
        case 10002:
            return "账号被禁止登录";
        case 10003:
            return "账号登录失败次数过多，请稍后重试！";
        case 10004:
            return "验证码错误或过期";
        case 10005:
            return "账号和密码不能为空";
        case 10006:
            return "验证码不能为空";
        case 10007:
            return "已经存在此账号";
        case 10008:
            return "找不到当前用户";
        case 10009:
            return "账号或密码长度非法";

        /*手机用户*/
        case 10101:
            return "账号或密码错误";
        case 10102:
            return "账号被禁用";

        default:
            // return "请按 Ctrl + F5 刷新页面并重试！";
            return result.msg;
    }
}

function getWeiXinMsg(result) {
    switch (result.code) {
        case -1:
            return "系统繁忙，请稍候再试！";
            break;
        case 0:
            return "请求成功";
            break;
        case 40001:
            return "AppSecret错误或access_token无效";
            break;
        case 40002:
            return "不合法的凭证类型";
            break;
        case 40003:
            return "不合法的OpenID";
            break;
        default:
            return result.msg;
    }
}

function getWeiBoMsg(result) {
    switch (result.code) {
        /*系统级错误代码*/
        case 10001:
            return "系统错误";
            break;
        case 10002:
            return "服务暂停";
            break;
        case 10003:
            return "远程服务错误";
            break;
        case 10004:
            return "IP限制不能请求该资源";
            break;
        case 10005:
            return "该资源需要appkey拥有授权";
            break;
        case 10006:
            return "缺少source_appkey参数";
            break;

        /*服务级错误代码*/
        case 20001:
            return "IDs参数为空";
            break;
        case 20002:
            return "Uid参数为空";
            break;
        case 20003:
            return "用户不存在";
            break;
        case 20005:
            return "图片仅支持JPG、GIF、PNG格式";
            break;
        case 20006:
            return "图片太大";
            break;

        /*默认提示*/
        default:
            return result.msg;
    }
}